// 引入工具类
import axios from '../config'

// 使用
const URL = 'api-ca' // 公共前缀地址
export const ruleResult = {
	//运行结果-查询
	queryRuleResultPage(data) {
		return axios.post(URL + '/ca/ruleResult/queryRuleBaseResult', data)
	},
	//获取场景列表
	queryRuleSceneList(data) {
		return axios.post(URL + '/ca/ruleScene/queryList', data)
	},
	//查看结果数据
	queryRunResultPage(data) {
		return axios.post(URL + '/ca/ruleResult/query', data)
	},
	//查看影响数据
	queryEffectDataPage(data) {
		return axios.post(URL + '/ca/ruleResult/queryResultData', data)
	},
	//获取源数据表头
	querySourceDataHead(data) {
		return axios.post(URL + '/ca/ruleResult/queryResultData', data)
	},
	//获取规则验证列表
	queryVaPage(data) {
		return axios.post(URL + '/ca/ruleva/query', data)
	},
	//回滚数据
	backResultData(data) {
		return axios.post(URL + '/ca/ruleResult/backResultData', data)
	},
	//查询静态动因导出sql
	getSqlForStaticExport(data) {
		return axios.post(URL + '/ca/ruleResult/getSqlForStaticExport', data)
	},
	//查询源数据列表表头
	querySourceColumns(data) {
		return axios.post(URL + '/ca/ruleResult/querySourceColumns', data)
	},
	//查询源数据列表数据
	querySourceShowData(data) {
		return axios.post(URL + '/ca/ruleResult/querySourceShowData', data)
	},
	//查询源数据列表数据
	getExportFile(data) {
		return axios.exportFile(URL + '/ca/ruleResult/exp', data)
	},
	// 导出运行结果源数据文件
	exportFile(data, loading = false) {
		return axios.exportFile(URL + '/ca/pubCaExcel/exportCaResultExcel', data, loading)
	}
}
